<?php

// 模板调用
if($GLOBALS["config"]['database']['database']!=''){
    $dsn="{$GLOBALS["config"]['database']['type']}:host={$GLOBALS["config"]['database']['hostname']};port={$GLOBALS["config"]['database']['hostport']};dbname={$GLOBALS["config"]['database']['database']}";
    $GLOBALS["db"] = new PDO($dsn,$GLOBALS["config"]['database']['username'],$GLOBALS["config"]['database']['password']);
}